home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’93 / Johan / hm.h < prev    next >
Text File  |  1993-06-18  |  1KB  |  64 lines

  1. void init(void);
  2.  
  3.  
  4. #ifdef MAIN
  5. #define EXTERN
  6. #define INIT(x) = x
  7. #else
  8. #define EXTERN extern
  9. #define INIT(x)
  10. #endif
  11.  
  12.  
  13. #define width(x)        ((x).right - (x).left)
  14. #define height(x)        ((x).bottom - (x).top)
  15. #define H(h)            (**(h))
  16. #define min(a,b)        ((a)>(b)?(b):(a))
  17. #define max(a,b)        ((a)>(b)?(a):(b))
  18.  
  19. #define MENU_Apple        128
  20. #define        item_about        1
  21.  
  22. #define MENU_File        129
  23. #define        item_quit        1
  24.  
  25. #define WIND_Maze        128
  26.  
  27. #define ICON_Left        128
  28. #define ICON_Down        129
  29. #define ICON_Right        130
  30. #define ICON_Up            131
  31. #define ICON_HiLeft        132
  32. #define ICON_HiDown        133
  33. #define ICON_HiRight    134
  34. #define ICON_HiUp        135
  35.  
  36. #define DLOG_About        128
  37.  
  38. #define ICON_SIZE        32
  39. #define ICON_MARGIN        4
  40. #define    SMALLEST_SIZE    96
  41. #define    SCROLL            4
  42. #define MAZE_LIMIT        8
  43.  
  44.  
  45. EXTERN MenuHandle    menuApple        INIT(0);
  46. EXTERN MenuHandle    menuFile        INIT(0);
  47.  
  48. EXTERN WindowPtr    mazeWindow        INIT(0);
  49.  
  50. EXTERN Boolean        done            INIT(false);
  51.  
  52. EXTERN EventRecord    theEvent;
  53.  
  54. EXTERN Rect            dragBounds;
  55. EXTERN Rect            sizeBounds;
  56. EXTERN RgnHandle    scratchRgn;
  57. EXTERN RgnHandle    scrollRgn;
  58. EXTERN Point        location;
  59.  
  60.  
  61.  
  62. void            doMazeClick(Point where, short modifiers);
  63. void            doMazeDraw(void);
  64.